import React, { memo } from 'react'
import { getSizeImage } from "@/utils/format-utils";
import { AlbumCoverWrapper } from "./style";

export default memo(function HjAlbumCover(props) {
  const {info,size,width,bgp} = props
  return (
    <AlbumCoverWrapper width={width} bgp={bgp}>
      <a className="album-image" href="/#">
          <img src={getSizeImage(info.picUrl, size)} alt="" />
      </a>
      <div className="album-info">
        <div className="name text-nowrap">
          <a href="/#">{info.name}</a>
        </div>
        <div className="artist text-nowrap">
          <a href="/#">{info.artist.name}</a>
        </div>
      </div>
    </AlbumCoverWrapper>
  )
})